Engineering Higher-Order Modules in SML/NJ
نویسندگان
چکیده
SML/NJ and other Standard ML variants extend the ML module system with higher-order functors, elevating the module language to a full functional language. In this paper, we describe the implementation of the higher-order module system in SML/NJ, which is unique in providing “true” higher-order behavior at the static level. This second generation implementation of higher-order modules in SML/NJ is based on three key techniques: unique internal variables (entity variables) for naming static entities, a factorization of the static information in both basic modules and functors into signatures and realizations, and a static lambda calculus we call the entity calculus with static “effects” to represent the type-level mapping performed by a functor. This system implements MacQueen-Tofte’s re-elaboration semantics without having to re-elaborate functor bodies or appeal to fragile stamp properties.
منابع مشابه
An Implementation of Higher-order Functors
Recently the module language of SML of New Jersey has been augmented with higher-order functors. Their semantics is described in Tof94, MT94]. This paper sketches how higher-order functors can be implemented with eecient static representations. The key idea of the SML/NJ implementation is the sharing of signature environments , and this idea has been carried over to the higher-order case.
متن کاملA Shared � Memory Multiprocessor Implementation of Data � Parallel
We have designed and implemented an asynchronous data parallel scheduler for the SML NJ ML com piler Using this general scheduler we built a data parallel module that provides new operators to ma nipulate sequences i e arrays vectors in parallel Parallelization concerns such as thread creation and synchronization are hidden from the application programmer by ML s module abstraction We nd that l...
متن کاملThesis Proposal: Effective Type Theory for Modularity
The programming language Standard ML (SML) draws much of its expressive power from advanced concepts in type theory. In addition, unlike other HOT (Higher-Order Typed) languages, SML has the distinction of being formally defined. Unfortunately, the Definition of SML is not type-theoretic, making it difficult to analyze and extend. Much work in the last decade has thus been devoted to better und...
متن کاملLambda-Splitting: A Higher-Order Appro Princeton University CS-TR-537-96 ach to Cross-Module Optimizations
We describe an algorithm for automatic inline expansion across module boundaries that works in the presence of higher-order functions and free variables; it rearranges bindings and scopes as necessary to move nonexpansive code from one module to another. We describe— and implement—the algorithm as transformations on calculus. Our inliner interacts well with separate compilation and is efficient...
متن کاملLambda-Splitting: AHigher-Order Approach to Cross-hloduleO ptimizations
We describe an algorithm for automatic inline expansion exroes module boundaries that works in the presence of higher-order functions and free variables; it rearrangesbindings and scopes M necessaryto move nonexpansive code from one module to another. We describe-and implement—the algorithm as transformations on A-calculus. Our inliner interacts well with separate compilation and is efficient, ...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2009